package com.file.system.mapper.system;

import com.file.system.entity.system.WebMenu;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
* 菜单 Mapper 接口
* @author jch
* @since 2022-08-05
*/
@Mapper
public interface WebMenuMapper{

    //添加菜单
    int save(WebMenu webMenu);

    //编辑菜单
    int update(@Param("ew") UpdateWrapper<WebMenu> query);

    //编辑菜单
    int updateById(WebMenu webMenu);

    //添加菜单(批量)
    int saveBatch(@Param("list") List<WebMenu> webMenuList);

    //通过id删除菜单
    int removeById(WebMenu webMenu);

    //通过id查询菜单
    WebMenu selectById(@Param("id") Long id);

    //查询菜单
    List<WebMenu> select(@Param("ew") QueryWrapper<WebMenu> query);

    //查询菜单分页
    List<WebMenu> select(Page<WebMenu> page, @Param("ew") QueryWrapper<WebMenu> query);

    //查询菜单数量
    int selectCount(@Param("ew") QueryWrapper<WebMenu> query);
}
